﻿using QD.LopPlat.UI.Model.Sys;
using QD.SQLHelper;
using System.Data.Entity;

namespace QD.LopPlat.UI.Code.DbContent
{
    /// <summary>
    /// 配置数据库
    /// </summary>
    public class DbConfigData : EFDbContext
    {
        public DbConfigData(string qfCode)
            : base(QDDataBaseHelper.GetDbConnectionString(qfCode))
        {
            Database.SetInitializer<DbConfigData>(null);
        }

        public DbConfigData()
            : base(DbConfig.Instance.GetDbConfigConnStr())
        {
            Database.SetInitializer<DbConfigData>(null);
        }

        public DbSet<Sys_Icon> Sys_Icon { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
